<%@ page language="java" contentType="text/html; charset=UTF-8"
    pageEncoding="UTF-8"%>
<%@taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>衣服更改</title>
<script type="text/javascript">
function upload(){
	window.open("<c:url value='ClothingAction?oper=upload'/>","图片上传",'width=600,height=100,top=80,left=80,toolbar=no, menubar=no, scrollbars=no, resizable=no');
}
</script>
</head>
<body>
		<form action="<c:url value='/ClothingAction?oper=update&id=${clothing.id }'/>" method="post">
			<input type="hidden" name="imgPath" id="imgPath">
			
	<c:choose>
		<c:when test="${empty clothing.picture }">
			<br />	图片：<img  id="photo" name="imgPath" src="images/1.jpg" width="300" height="200">
		</c:when>
		<c:otherwise>
		图片：<img id="photo" name="imgPath" src="<c:url value="upload/${clothing.picture}"/>" width="300" height="200">
		</c:otherwise>
	</c:choose>
	<input  type="button" onclick="upload()" value="上传图片"/>
			<br/>
			${clohing.picture }
			名称：<input type="text" name="clothing_name" value="${clothing.name }">
			<br/>
			价格：<input type="text" name="price" value="${clothing.price }"/>
			<br/>
			售价：<input type="text" name="saleprice" value="${clothing.saleprice}"/>
			<br/>
			尺寸：<input type="text" name="size" value="${clothing.size}"/>
			<br/>
			颜色：<input type="text" name="color" value="${clothing.color }"/>
			<br/>
			类别：<select name="kindId">
			<option value="${clothing.kind.id }"  selected="selected">${clothing.kind.season }</option>
			<c:forEach items="${kindlist }" var="kind">
			<option value="${kind.id }">${kind.season }</option>
			</c:forEach>
			</select>
			<br/>
			描述：<input type="text" name="summary" value="${clothing.summary }"/>
			<input type="submit" value="确认修改">
		</form>
</body>
</html>